package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 接收消息表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_received_messages")
public class ReceivedMessages extends Model<ReceivedMessages> {

    private static final long serialVersionUID = 1L;

    /**
     * 接收消息唯一标识
     */
    @TableId("received_id")
    private Long receivedId;
    /**
     * RocketMQ 消息 ID
     */
    @TableField("message_id")
    private String messageId;
    /**
     * 消息所属主题
     */
    private String topic;
    /**
     * 消息标签
     */
    private String tag;
    /**
     * 消息内容
     */
    private String body;
    /**
     * 接收状态（0：未接收，1：已接收，2：接收失败）
     */
    @TableField("receive_status")
    private Integer receiveStatus;
    /**
     * 消息接收时间
     */
    @TableField("receive_time")
    private Date receiveTime;
    /**
     * 相关用户ID（关联用户表）
     */
    @TableField("user_id")
    private Long userId;
    /**
     * 相关订单ID（关联订单表）
     */
    @TableField("order_id")
    private Long orderId;
    /**
     * 消息描述或备注
     */
    private String description;
    /**
     * 记录创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 记录更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getReceivedId() {
        return receivedId;
    }

    public void setReceivedId(Long receivedId) {
        this.receivedId = receivedId;
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public Integer getReceiveStatus() {
        return receiveStatus;
    }

    public void setReceiveStatus(Integer receiveStatus) {
        this.receiveStatus = receiveStatus;
    }

    public Date getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Date receiveTime) {
        this.receiveTime = receiveTime;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "ReceivedMessages{" +
        ", receivedId=" + receivedId +
        ", messageId=" + messageId +
        ", topic=" + topic +
        ", tag=" + tag +
        ", body=" + body +
        ", receiveStatus=" + receiveStatus +
        ", receiveTime=" + receiveTime +
        ", userId=" + userId +
        ", orderId=" + orderId +
        ", description=" + description +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
